package com.idTech;

import jacob.Healer;
import jacob.util;
import scala.languageFeature;



import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.ForgeHooks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.stats.Achievement;
import net.minecraft.world.biome.BiomeGenBase;

@Mod(modid = "iDTechModBaseJacob", name = "iDTechModBaseJacob", version = "0.0.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class iDTechModBaseJacob 
{
	
	@Instance("iDTechModBaseJacob")
	public static iDTechModBaseJacob instance;
	
	@SidedProxy(clientSide="com.idTech.ClientProxy", serverSide="com.idTech.CommonProxy")
	public static CommonProxy proxy;
	static int startEntityId = 708;
	public static Item Lighting_Sword= new jacob.Lighting_Sword(690, EnumToolMaterial.EMERALD).setUnlocalizedName("Lightning Sword");
	public static Item Lava_Sword= new jacob.Lava_Sword(691, EnumToolMaterial.EMERALD).setUnlocalizedName("Lava Sword");
	public static Item Water_Bow= new jacob.Water_Bow(692, EnumToolMaterial.EMERALD).setUnlocalizedName("Water Bow");
	public static Item Lava_Bow= new jacob.Lava_Bow(693, EnumToolMaterial.EMERALD).setUnlocalizedName("Lava Bow");
	public static Item Mob_Bow = new jacob.Mob_Bow(694, EnumToolMaterial.EMERALD).setUnlocalizedName("Mob Bow");
	public static Item Explosive_Wand = new jacob.Explosive_Wand(695, EnumToolMaterial.EMERALD).setUnlocalizedName("Explosive Wand");
	public static Item WackyMonsterPlacer = new jacob.WackyMonsterPlacer(696);
	public static Item Pig_Wand = new jacob.Pig_Wand(697, EnumToolMaterial.EMERALD).setUnlocalizedName("Teleportation Wand");
	public static Item Fire_Wand = new jacob.Fire_Wand(698, EnumToolMaterial.EMERALD).setUnlocalizedName("Fire Wand");
	public static Block Spawnerjacob = new jacob.Spawnerjacob(699, Material.lava).setUnlocalizedName("Jacob Spawner");
	public static Item QuickBaseWand = new jacob.QuickBaseWand(700, EnumToolMaterial.EMERALD).setUnlocalizedName("Base Wand");
	public static Item helmetEmerald;
    public static Item chestplateEmerald;
    public static Item legsEmerald;
    public static Item bootsEmerald;
    public static Block Bigtnt = new jacob.Bigtnt(705, Material.tnt).setUnlocalizedName("Ultra Tnt");
    public static Item Mobarenawand = new jacob.Mob_Arena_Wand(706, EnumToolMaterial.EMERALD).setUnlocalizedName("MOB arena wand");
	public void preInit(FMLPreInitializationEvent event)
	{
	}
	@Init
	public void load(FMLInitializationEvent event)
	{
		
		
		helmetEmerald = new Emerald_Armor(701, EnumArmorMaterial.DIAMOND, proxy.addArmor("EmeraldArmor"), 0).setUnlocalizedName("helmetEmerald");
         
		chestplateEmerald = new Emerald_Armor(702, EnumArmorMaterial.DIAMOND, proxy.addArmor("EmeraldArmor"), 1).setUnlocalizedName("chestplateEmerald");
         
		legsEmerald = new Emerald_Armor(703, EnumArmorMaterial.DIAMOND, proxy.addArmor("EmeraldArmor"), 2).setUnlocalizedName("legsEmerald");
         
		bootsEmerald = new Emerald_Armor(704, EnumArmorMaterial.DIAMOND, proxy.addArmor("EmeraldArmor"), 3).setUnlocalizedName("bootsEmerald");
		util.recipies();
		EntityRegistry.registerModEntity(Healer.class, "Magic Zombie", 850, this, 80, 1, true);
		GameRegistry.registerBlock(Bigtnt);
		EntityRegistry.addSpawn(Healer.class, 10, 20, 30, EnumCreatureType.monster, BiomeGenBase.beach, BiomeGenBase.extremeHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.mushroomIsland, BiomeGenBase.mushroomIslandShore, BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.river, BiomeGenBase.swampland);
		GameRegistry.registerBlock(Spawnerjacob, Spawnerjacob.getUnlocalizedName());
		LanguageRegistry.addName(bootsEmerald, "Emerald Boots");
		LanguageRegistry.addName(legsEmerald, "Emerald Leggings");
		LanguageRegistry.addName(chestplateEmerald, "Emerald Chestplate");
		LanguageRegistry.addName(helmetEmerald, "Emerald Helmet");
		LanguageRegistry.addName(QuickBaseWand, "Quick Base");
		LanguageRegistry.addName(Lighting_Sword, "Lightning Sword");
		LanguageRegistry.addName(Lava_Sword, "Lava Sword");
		LanguageRegistry.addName(Water_Bow, "Water Bow");
		LanguageRegistry.addName(Lava_Bow, "Lava Bow");
		LanguageRegistry.addName(Mob_Bow, "Mob Bow");
		LanguageRegistry.addName(Explosive_Wand, "Explosive wand");
		LanguageRegistry.addName(Pig_Wand, "Teleportation Wand");
		LanguageRegistry.addName(Fire_Wand, "Fire/Farming Wand");
		LanguageRegistry.addName(Spawnerjacob, "Jacob's Spawner");
		LanguageRegistry.addName(Bigtnt, "Ultra Tnt");
		
		registerEntityEgg(Healer.class, 0xffffff, 0x000000);
	}
	
	public static int getUniqueEntityId()
    {
            do
            {
                    startEntityId++;
            }
            while (EntityList.getStringFromID(startEntityId) != null);

            return startEntityId;
    }

    public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor)
    {
            int id = getUniqueEntityId();
            EntityList.IDtoClassMapping.put(id, entity);
            EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
    }

	@PostInit 
	public void postInit(FMLPostInitializationEvent event)
	{
	}
}
